{
	"info": {
		"_postman_id": "8a81bdf4-abc9-401c-8655-ef1b6e6dce7c",
		"name": "HWST Printing",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "1558845"
	},
	"item": [
		{
			"name": "PrintRaw",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "",
							"type": "file",
							"src": "postman-cloud:///1ef38558-f623-4b90-b977-0143b55e9b72"
						}
					]
				},
				"url": {
					"raw": "{{HWST_Host}}:{{HWTS_Port}}/api/printer/{{PDFPrinterID}}/printraw",
					"host": [
						"{{HWST_Host}}"
					],
					"port": "{{HWTS_Port}}",
					"path": [
						"api",
						"printer",
						"{{PDFPrinterID}}",
						"printraw"
					]
				},
				"description": "The PrintRaw function can print PDF documents, labels, and more to a Windows printer (not OPOS). LS Central currently uses this function to print PDF receipts and shelf labels. The PrintRaw function takes a byte array stream as parameter, which can be seen in the LS Central implementation."
			},
			"response": []
		},
		{
			"name": "PrintRaw Query String",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "",
							"type": "file",
							"src": "postman-cloud:///1ef38558-f623-4b90-b977-0143b55e9b72"
						}
					]
				},
				"url": {
					"raw": "{{HWST_Host}}:{{HWTS_Port}}/api/printer/printraw?id={{PDFPrinterID}}",
					"host": [
						"{{HWST_Host}}"
					],
					"port": "{{HWTS_Port}}",
					"path": [
						"api",
						"printer",
						"printraw"
					],
					"query": [
						{
							"key": "id",
							"value": "{{PDFPrinterID}}"
						}
					]
				},
				"description": "The reason this may be preferable is that it accepts more diverse strings, such as ones with backslashes. For example, if the printer name is a network printer with a name like _\\\\\\\\123.123.123.123\\\\NETWORK_PRINTER_, it would only work as a query string but not the method mentioned above."
			},
			"response": []
		},
		{
			"name": "PrintLabel",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "",
							"type": "file",
							"src": "postman-cloud:///1ef38558-f623-4b90-b977-0143b55e9b72"
						}
					]
				},
				"url": {
					"raw": "{{HWST_Host}}:{{HWTS_Port}}/api/printer/{{PDFPrinterID}}/printlabel",
					"host": [
						"{{HWST_Host}}"
					],
					"port": "{{HWTS_Port}}",
					"path": [
						"api",
						"printer",
						"{{PDFPrinterID}}",
						"printlabel"
					]
				},
				"description": "The PrintRaw function can print PDF documents, labels, and more to a Windows printer (not OPOS). LS Central currently uses this function to print PDF receipts and shelf labels. The PrintRaw function takes a byte array stream as parameter, which can be seen in the LS Central implementation."
			},
			"response": []
		},
		{
			"name": "PrintLabel Query String",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "",
							"type": "file",
							"src": "postman-cloud:///1ef38558-f623-4b90-b977-0143b55e9b72"
						}
					]
				},
				"url": {
					"raw": "{{HWST_Host}}:{{HWTS_Port}}/api/printer/printlabel?id={{PDFPrinterID}}",
					"host": [
						"{{HWST_Host}}"
					],
					"port": "{{HWTS_Port}}",
					"path": [
						"api",
						"printer",
						"printlabel"
					],
					"query": [
						{
							"key": "id",
							"value": "{{PDFPrinterID}}"
						}
					]
				},
				"description": "The reason this may be preferable is that it accepts more diverse strings, such as ones with backslashes. For example, if the printer name is a network printer with a name like _\\\\\\\\123.123.123.123\\\\NETWORK_PRINTER_, it would only work as a query string but not the method mentioned above."
			},
			"response": []
		},
		{
			"name": "PrintPDF",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "",
							"type": "file",
							"src": "postman-cloud:///1ef38558-f623-4b90-b977-0143b55e9b72"
						}
					]
				},
				"url": {
					"raw": "{{HWST_Host}}:{{HWTS_Port}}/api/printer/{{PDFPrinterID}}/printpdf",
					"host": [
						"{{HWST_Host}}"
					],
					"port": "{{HWTS_Port}}",
					"path": [
						"api",
						"printer",
						"{{PDFPrinterID}}",
						"printpdf"
					]
				},
				"description": "The PrintRaw function can print PDF documents, labels, and more to a Windows printer (not OPOS). LS Central currently uses this function to print PDF receipts and shelf labels. The PrintRaw function takes a byte array stream as parameter, which can be seen in the LS Central implementation."
			},
			"response": []
		},
		{
			"name": "PrintPDF Query String",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "formdata",
					"formdata": [
						{
							"key": "",
							"type": "file",
							"src": "postman-cloud:///1ef38558-f623-4b90-b977-0143b55e9b72"
						}
					]
				},
				"url": {
					"raw": "{{HWST_Host}}:{{HWTS_Port}}/api/printer/printpdf?id={{PDFPrinterID}}",
					"host": [
						"{{HWST_Host}}"
					],
					"port": "{{HWTS_Port}}",
					"path": [
						"api",
						"printer",
						"printpdf"
					],
					"query": [
						{
							"key": "id",
							"value": "{{PDFPrinterID}}"
						}
					]
				},
				"description": "The reason this may be preferable is that it accepts more diverse strings, such as ones with backslashes. For example, if the printer name is a network printer with a name like _\\\\\\\\123.123.123.123\\\\NETWORK_PRINTER_, it would only work as a query string but not the method mentioned above."
			},
			"response": []
		},
		{
			"name": "PrintBufferWithConfig",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "{\r\n    \"DataTable\": [\r\n        {\r\n            \"Station No.\": \"2\",\r\n            \"LineType\": \"2\",\r\n            \"Text\": \"<27><124><98><67>This is a test string\",\r\n            \"Width\": \"0\",\r\n            \"Height\": \"0\",\r\n            \"TransactionType\": \"0\",\r\n            \"FontType\": \"0\",\r\n            \"DesignText\": \"#L######################################\"\r\n        }\r\n    ],\r\n    \"PrinterConfig\": {\r\n        \"DeviceID\": \"{{VirtualPrinterID}}\",\r\n        \"DeviceHost\": \"{{HWST_Host}}:{{HWTS_Port}}\",\r\n        \"HTTPS\": false,\r\n        \"PrinterType\": 1,\r\n        \"ShareDevice\": false,\r\n        \"LogoCode\": \"\",\r\n        \"LogoDownloadPath\": \"\",\r\n        \"LogoAlign\": 0,\r\n        \"LogoSize\": 0,\r\n        \"LogoType\": 0,\r\n        \"BitmapNo\": 1,\r\n        \"CharacterSet\": 0,\r\n        \"PrinterDocInsertRemovalTimeOut\": 30,\r\n        \"PrinterNormal\": \"<27><124><78>\",\r\n        \"PrinterBold\": \"<27><124><98><67>\",\r\n        \"PrinterWide\": \"<27><124><50><67>\",\r\n        \"PrinterHigh\": \"<27><124><51><67>\",\r\n        \"PrinterHighWide\": \"<27><124><52><67>\",\r\n        \"PrinterItalic\": \"<27><124><105><67>\",\r\n        \"PrinterLeftMargin\": 0,\r\n        \"LineFeedsAtReceiptEnd\": 0,\r\n        \"LineFeedsAtInvoiceTop\": 0,\r\n        \"CutPercentage\": 0,\r\n        \"IsFiscal\": false,\r\n        \"PropertiesProfile\": \"\",\r\n        \"DialogHeaderText\": \"\"\r\n    }\r\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "{{HWST_Host}}:{{HWTS_Port}}/api/printer/{{VirtualPrinterID}}/printbufferwithconfig",
					"host": [
						"{{HWST_Host}}"
					],
					"port": "{{HWTS_Port}}",
					"path": [
						"api",
						"printer",
						"{{VirtualPrinterID}}",
						"printbufferwithconfig"
					]
				}
			},
			"response": []
		},
		{
			"name": "PrintBuffer",
			"request": {
				"method": "POST",
				"header": [],
				"body": {
					"mode": "raw",
					"raw": "[\r\n    {\r\n        \"Station No.\": \"2\",\r\n        \"LineType\": \"2\",\r\n        \"Text\": \"<27><124><98><67>This is a test string\",\r\n        \"Width\": \"0\",\r\n        \"Height\": \"0\",\r\n        \"TransactionType\": \"0\",\r\n        \"FontType\": \"0\",\r\n        \"DesignText\": \"#L######################################\"\r\n    }\r\n]",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "{{HWST_Host}}:{{HWTS_Port}}/api/printer/{{VirtualPrinterID}}/printBuffer",
					"host": [
						"{{HWST_Host}}"
					],
					"port": "{{HWTS_Port}}",
					"path": [
						"api",
						"printer",
						"{{VirtualPrinterID}}",
						"printBuffer"
					]
				},
				"description": "PrintBuffer takes a JSON array in the body of the request in the same form as the SignalR version does as parameters. The array is a collection of objects formatted like this Body:"
			},
			"response": []
		},
		{
			"name": "PrintTest",
			"request": {
				"method": "POST",
				"header": [],
				"url": {
					"raw": "{{HWST_Host}}:{{HWTS_Port}}/api/printer/{{VirtualPrinterID}}/printtest",
					"host": [
						"{{HWST_Host}}"
					],
					"port": "{{HWTS_Port}}",
					"path": [
						"api",
						"printer",
						"{{VirtualPrinterID}}",
						"printtest"
					]
				},
				"description": "This function simply prints out a test receipt, same as the **Print Test Receipt** button in the [Management Portal](https://help.lscentral.lsretail.com/Content/LS-Retail/LS-Hardware-Station/Installing-And-Configuring/Management-Portal.htm). This test function is very useful for testing the connection to the Hardware Station and if the HTTP request is valid."
			},
			"response": []
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "HWST_Host",
			"value": "localhost"
		},
		{
			"key": "HWTS_Port",
			"value": "8082",
			"type": "string"
		},
		{
			"key": "PDFPrinterID",
			"value": "PDFCREATOR",
			"type": "string"
		},
		{
			"key": "VirtualPrinterID",
			"value": "VIRTUAL_P1",
			"type": "string"
		}
	]
}